/*
  标准 CSS Reset
  基于 Eric Meyer 的 Reset 并结合现代浏览器特性
*/

/* 所有元素应用 border-box 模型，方便布局 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 重置所有元素的内外边距、边框、字体等 */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 语义化元素设为块级 */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}

/* 重置列表样式 */
ol,
ul {
  list-style: none;
}

/* 重置表格样式 */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* 重置图片、视频等替换元素 */
img,
video,
canvas,
audio,
svg {
  display: block;
  max-width: 100%;
}

/* 重置表单元素 */
button,
input,
select,
textarea {
  /* 继承字体和颜色 */
  font: inherit;
  color: inherit;
  /* 移除默认边框和轮廓 */
  border: none;
  outline: none;
  /* 清除默认样式 */
  background: transparent;
  /* 统一垂直对齐 */
  vertical-align: middle;
}

/* 链接重置 */
a {
  text-decoration: none;
  color: inherit; /* 继承父元素颜色 */
}

/* 防止字体缩放 */
body {
  line-height: 1;
  -webkit-text-size-adjust: 100%;
}

/* 清除浮动（可选） */

.clearfix::after {
  content: "";
  display: table;
  clear: both;
}

/* 业务代码 */
body {
  height: 100vh;
  background:#000 url(./bg.jpg);
}
.starwars {
  /* 相对单位，相对于自身的字体大小 
    默认字体大小是16
  */
  width: 34em;
  height: 17em;
  /* 绝对定位 */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  /* css 调试手法， 背景颜色调试大法 */
  /* background-color: red; */
}
img {
  width: 100%;
}
.star, .wars, .byline {
  position: absolute;
}
 body{
    height: 100vh;
    background: url('./xk.png');
 }
 .starwars{
    /* em 相对单位，相对于自身的字体大小，默认是16px ，rem 相对于根元素的字体大小*/
     width: 32em;
    height: 17em;
    position: absolute;
    top: 50%;
    left: 50%; 
    /* css背景颜色调试法*/
     /* background-color: wheat;  */
    transform: translate(-50%,-50%); 
    /* 支持3d声明 */
     perspective: 800px; 
    /* 保持3d变换 */
    transform-style:preserve-3d;
} 
.wars,.byline{
    position: absolute;
}
.star{
    top: -0.75em;
    /* 动画属性 
    star animation-name 动作脚本
    10s animation-duration 动作时间
    ease-out animation-timing-function
    ease-out infinite 重复动画 */
    
    animation: star 10s ease-out infinite
} 
 .wars{
    bottom: -0.5em;
    animation: wars 10s ease-out infinite
} 
.byline{
    color: rgb(229, 198, 151);
    left: -2em;
    right: -2em;
    top: 45%;
    /* background-color: aqua; */
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    font-size: 1.5em;
}
 /* 设计动作
 设计动画的关键帧
 opacity: 0;设置不可见
 transform: scale(2);放大倍数
 translateY(-0.75em)像上
 */
 @keyframes star {
    /* 写每个关键帧的属性 */
    0%{
        opacity: 0;
        transform: scale(1.5) translateY(-0.75em)
    }
    20%{
        opacity: 1;
    }
    89%{
        opacity: 1;
        transform: scale(1);
    }
    100%{
        opacity: 0;
        transform: translateZ(-1000em);
    }
 }
 @keyframes wars {
    0%{
        opacity: 0;
        transform: scale(1.5) translatex(-0.75em)
    }
    20%{
        opacity: 1;
    }
    90%{
        opacity: 1;
        transform: scale(1);
    }
    100%{
        opacity: 0;
        transform: translateZ(-1000em);
    }
 }
 .byline{
     display: inline-block; 
    animation: move 10s linear infinite;
 }
 .byline span{
    display: inline-block;
    animation: spin 10s linear infinite;
 }
 @keyframes move {
    0%{
        transform: rotateY(90dge);
    }
    100%{
        transform: rotateY(0)
    }
 }
 @keyframes spin {
    0%,10%{
        opacity: 0;
        transform: rotateY(90deg)
    }
    30%{
        opacity: 1;
    }
    70%,80%{
        transform: rotateY(0);
        opacity: 1;
    }
    90%,100%{
        opacity: 0;
    }
 }